home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / setjusage.z / setjusage
Encoding:
Text File  |  2002-10-03  |  5.6 KB  |  133 lines

  1.  
  2.  
  3.  
  4. sssseeeettttjjjjuuuussssaaaaggggeeee((((2222))))                                                      sssseeeettttjjjjuuuussssaaaaggggeeee((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      setjusage - set job usage information
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////rrrreeeessssoooouuuurrrrcccceeee....hhhh>>>>
  13.  
  14.      iiiinnnntttt sssseeeettttjjjjuuuussssaaaaggggeeee((((jjjjiiiidddd____tttt jjjjiiiidddd,,,, iiiinnnntttt rrrreeeessssoooouuuurrrrcccceeee,,,, ssssttttrrrruuuucccctttt jjjjoooobbbbrrrruuuussssaaaaggggeeee ****uuuupppp))))
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      The _s_e_t_j_u_s_a_g_e function updates the resource usage values for the
  18.      specified job ID.  If the _j_i_d parameter is zero, usage values for the
  19.      current job will be updated.  If _j_i_d is non-zero, it represents the job
  20.      ID of the job for which usages values are updated.  The _r_e_s_o_u_r_c_e
  21.      parameter specifies the resource for which the usage values are to be
  22.      updated.  Allowable values are taken from the JLIMIT_xxx macros found in
  23.      the ssssyyyyssss////rrrreeeessssoooouuuurrrrcccceeee....hhhh file.  For example, the JLIMIT_CPU macro is for cpu
  24.      time.  The _u_p parameter points to a _j_o_b_r_u_s_a_g_e structure in the user
  25.      program where the usage values are stored.
  26.  
  27.      To be able to update resource usage values using _s_e_t_j_u_s_a_g_e, the job must
  28.      be ignoring the accumulation and enforcement of the limits for the
  29.      specified resource.  It is determined at job creation if it will be
  30.      ignoring specific resource limits, based upon the values of the following
  31.      system tunable parameters:
  32.  
  33.      [jlimit_pmem_ign]
  34.                     Ignore the accumulation and enforcement of the total
  35.                     aggregate physical memory usage for the job.
  36.  
  37.      [jlimit_numproc_ign]
  38.                     Ignore the accumulation and enforcement of limits on the
  39.                     number of processes in the job.
  40.  
  41.      [jlimit_pthread_ign]
  42.                     Ignore the accumulation and enforcement of the number of
  43.                     pthreads in the job.
  44.  
  45.      [jlimit_nofile_ign]
  46.                     Ignore the accumulation and enforcement of the number of
  47.                     open files in the job.
  48.  
  49.      [jlimit_rss_ign]
  50.                     Ignore the accumulation and enforcement of the total
  51.                     aggregate resident set size for the job.
  52.  
  53.      [jlimit_vmem_ign]
  54.                     Ignore the accumulation and enforcement of total aggregate
  55.                     virtual memory size for the job.  for all proce
  56.  
  57.      [jlimit_data_ign]
  58.                     Ignore the accumulation and enforcement of total aggregate
  59.                     data segment size for the job.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. sssseeeettttjjjjuuuussssaaaaggggeeee((((2222))))                                                      sssseeeettttjjjjuuuussssaaaaggggeeee((((2222))))
  71.  
  72.  
  73.  
  74.      [jlimit_cpu_ign]
  75.                     Ignore the accumulation and enforcement of CPU time usage
  76.                     for the job.
  77.  
  78.      The values for these tunable parameters can be changed at run-time.  By
  79.      default these values are set so that the accumulation and enforcement of
  80.      resource usage limits are not ignored.  Changing these values at run-time
  81.      will only affect the behavior of jobs created after the parameter was
  82.      changed.  Those jobs that existed prior to the parameter being changed
  83.      will continue with unchanged concerning the accumulation and enforcement
  84.      of job limits for resource usage.
  85.  
  86.      For additional information concering system tunable parameters, please
  87.      see the systune(1M) man page.
  88.  
  89.      The process attempting to use _s_e_t_j_u_s_a_g_e must have the CAP_PROC_MGT
  90.      capability.  See the capability(4) and capabilities(4) man pages for more
  91.      information on the capability mechanism that provides fine grained
  92.      control over the privileges of a process.
  93.  
  94. EEEERRRRRRRROOOORRRRSSSS
  95.      Under the following conditions, the _ssss_eeee_tttt_jjjj_uuuu_ssss_aaaa_gggg_eeee function fails and sets
  96.      _e_r_r_n_o to:
  97.  
  98.      [ENOPKG]       The job limits software is not installed.
  99.  
  100.      [ENOJOB]       A job with the specified job ID cannot be found.
  101.  
  102.      [ENOACCES]     The process does not have the appropriate privileges, so
  103.                     permission to set the job usage value is denied.
  104.  
  105.      [ENOPERM]      The resource limit accumulation and enforcement is not
  106.                     being ignored by the job, so the operation is not
  107.                     permitted.
  108.  
  109. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  110.      systune(1M), getrusage(3).
  111.  
  112. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  113.      Upon successful completion, _s_e_t_j_u_s_a_g_e returns a value of 0.  Otherwise, a
  114.      value of -1 is returned and eeeerrrrrrrrnnnnoooo is set to indicate the error.
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.